package com.sunsun.news.page.widget;

import java.util.List;

import android.app.Activity;
import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.TextView;

import com.itboye.sunsun.beans.LunTanHomePageBean.LunTanItemBean;
import com.itboye.sunsunhome.R;


public class FootviewAdapter  extends BaseFootviewAdapter<LunTanItemBean>{
	List<LunTanItemBean> dataList;
	Activity activity;
    private ListItemView listItemView = null;

    public final class ListItemView {
        public LinearLayout gas_station_groupon_ll;
        public TextView gpn_name;
       
    }

    public FootviewAdapter( Context mContext, ListView mListView) {
        super(mContext, mListView);
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        final LunTanItemBean object = (LunTanItemBean)getItem(position);
        if (convertView == null) {
            convertView = inflater.inflate(R.layout.lv_gas_station_detail_groupon, parent, false);
            listItemView = new ListItemView();
            creatView(convertView, listItemView);
            convertView.setTag(listItemView);
        } else {
            listItemView = (ListItemView) convertView.getTag();
        }
        listItemView.gpn_name.setText(object.getSubject());
        
        return convertView;
    }

    private void creatView(View rowView, ListItemView listItemView) {
        listItemView.gas_station_groupon_ll = (LinearLayout) rowView.findViewById(R.id.gas_station_groupon_ll);
        listItemView.gpn_name = (TextView) rowView.findViewById(R.id.textview);
//        listItemView.gpn_price = (TextView) rowView.findViewById(R.id.gpn_price);
//        listItemView.gpn_old_price = (TextView) rowView.findViewById(R.id.gpn_old_price);
    }

}
